define(function(require,exports,modlue){
	
	var ranktabs = $("[name='rankType']");
	var ranktpl = require('/themes/theme_default/media/tpl/arcListRank.tpl');//载入tpl模板
	function getAjax(index){
		var rankid = ranktabs[index].id;
		$.ajax({
			url:"/article/rank.html?type="+rankid,
			type:"get",
			dataType:"json",
			success:function(data){
				var template = Handlebars.compile(ranktpl);
				var html = template(data);
				$(ranktabs[index]).html(html);
			}
		});
	};
	for(var i=0,len=ranktabs.length;i<len;i++){
		getAjax(i);
	}
	
	function tabs(tabTit,on,tabCon){
        $(tabTit).children().hover(function(){
            $(this).addClass(on).siblings().removeClass(on);
            var index = $(tabTit).children().index(this);
           	$(tabCon).children().eq(index).show().siblings().hide();
    	});
	};
    tabs(".qd_asidetag","activeTag",".qd_asideShow");
});

	